﻿import { AbpModule } from '@abp/abp.module';
import * as ngCommon from '@angular/common';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppLocalizationService } from '@app/shared/common/localization/app-localization.service';
import { AppNavigationService } from '@app/shared/layout/nav/app-navigation.service';
import { CommonModule } from '@shared/common/common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { ModalModule } from 'ngx-bootstrap';
import { PaginatorModule } from 'primeng/primeng';
import { TableModule } from 'primeng/table';
import { AppAuthService } from './auth/app-auth.service';
import { AppRouteGuard } from './auth/auth-route-guard';
import { JqPluginDirective } from './libs/jq-plugin.directive';
import { CommonLookupModalComponent } from './lookup/common-lookup-modal.component';
import { DatePickerDirective } from './timing/date-picker.component';
import { DateRangePickerComponent } from './timing/date-range-picker.component';
import { DateRangeEmptyPickerComponent } from './timing/date-range-empty-picker.component';
import { DateTimeService } from './timing/date-time.service';
import { TimeZoneComboComponent } from './timing/timezone-combo.component';
import { TableDateTimeComponent } from './timing/table-date-time.component';
import { ExcelImportComponent } from './excel/excel-import.component';
import { SelectLocationComponent } from './select-location/select-location.component';

@NgModule({
  imports: [
    ngCommon.CommonModule,
    FormsModule,
    ModalModule.forRoot(),
    UtilsModule,
    AbpModule,
    CommonModule,
    TableModule,
    PaginatorModule
  ],
  declarations: [
    TimeZoneComboComponent,
    JqPluginDirective,
    CommonLookupModalComponent,
    DateRangePickerComponent,
    DateRangeEmptyPickerComponent,
    DatePickerDirective,
    TableDateTimeComponent,
    ExcelImportComponent,
    SelectLocationComponent
  ],
  exports: [
    TimeZoneComboComponent,
    JqPluginDirective,
    CommonLookupModalComponent,
    DateRangePickerComponent,
    DateRangeEmptyPickerComponent,
    DatePickerDirective,
    TableDateTimeComponent,
    ExcelImportComponent,
    SelectLocationComponent
  ],
  providers: [DateTimeService, AppLocalizationService, AppNavigationService]
})
export class AppCommonModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: AppCommonModule,
      providers: [AppAuthService, AppRouteGuard]
    };
  }
}
